<template>
  <div>
      <table>
          <tr>
              <td>名称</td>
              <td>操作</td>
          </tr>
          <tr v-for="i in list">
              <td>{{i.name}}</td>
              <td>
                  <button>修改</button>
                  <button>删除</button>
              </td>
          </tr>
          <tr>
              <td>
                  <van-paginalion
                  v-model="currentPage"
                  :page-count="total"
                  :items-per-page="2"
                  force-ellipses
                  />
              </td>
          </tr>
      </table>
  </div>
</template>

<script>
export default {
    data(){
        return{
            list:[],
            currentPage:1,
            total:10
        }
    },
    methods:{
        getlist(){
            this.axios.get('cateM?page='+this.currentPage).then(res=>{
                this.list = res.data.list
                this.total = res.data.total
            })
        }
    },
}
</script>

<style>

</style>